package com.sinping.qh.repository.mongo.common;

import com.sinping.qh.domain.common.UploadImage;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

/**
 * @author wupeng
 * @create 2018/5/30
 */
public interface UploadImageRepository extends MongoRepository<UploadImage, String> {
    /**
     * 根据图片所属的记录Id查找
     *
     * @param roleId
     * @return
     */
    List<UploadImage> findAllByRoleId(String roleId);

    /**
     * 批量删除图片
     */
    void deleteAllByRoleId(String roleId);
}
